English
The useSellModal hook is used to sell an NFT by accepting an existing offer. It provides the necessary functionality to complete the selling process.
import { useSellModal } from "@0xsequence/marketplace-sdk/react"; ## Into your React component: const { show: showSellModal } = useSellModal({ onError }); const onAcceptOffer = () => { showSellModal({ collectionAddress, chainId, tokenId, order, }); }; return <button onClick={onAcceptOffer}>Accept Offer</button>
Show child attributes
interface useSellModal { onSuccess?: ({ hash, orderId }: { hash?: Hash; orderId?: string; }) => void; onError?: (error: Error) => void; }
interface ShowSellModalArgs { collectionAddress: Hex; chainId: string; tokenId: string; order: Order; callbacks?: ModalCallbacks; }
Was this page helpful?